projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b05471e
)
Ignore invalid SVG images
author
Lars Ingebrigtsen
<larsi@gnus.org>
Thu, 24 Dec 2015 13:40:16 +0000
(14:40 +0100)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Thu, 24 Dec 2015 13:40:16 +0000
(14:40 +0100)
* shr.el (shr-tag-svg): Ignore SVG images that have no width
or height, because these can't be displayed by ImageMagick,
anyway.
lisp/net/shr.el
patch
|
blob
|
history
diff --git
a/lisp/net/shr.el
b/lisp/net/shr.el
index dbf45b885daafbf582ca372dd068df25769fc4b7..d51b8c73d109f3bdc2de03f6da213f6ddae7e335 100644
(file)
--- a/
lisp/net/shr.el
+++ b/
lisp/net/shr.el
@@
-1152,7
+1152,9
@@
ones, in case fg and bg are nil."
(defun shr-tag-svg (dom)
(when (and (image-type-available-p 'svg)
- (not shr-inhibit-images))
+ (not shr-inhibit-images)
+ (dom-attr dom 'width)
+ (dom-attr dom 'height))
(funcall shr-put-image-function (list (shr-dom-to-xml dom) 'image/svg+xml)
"SVG Image")))